I am currently using ABP Framework v8.2.3 with the following setup:
UI Type: React Database System: EF Core (SQL Server) Auth Server Separated: Yes .NET Version: .NET 8
I have identified a vulnerability in one of the transitive dependencies used by ABP: Scriban@5.9.0 (Transitive) Scriban versions prior to 7.0.0 are affected by a CWE‑693 Protection Mechanism Failure, where TemplateContext caches type member accessors by Type only. If a TemplateContext instance is reused and the MemberFilter or MemberRenamer is tightened for later renders, Scriban may continue to expose members that should now be restricted. I understand that this issue is fixed in Scriban 7.0.0+, but upgrading to that version would require .NET 9, which I am not able to migrate to at this time. I would like to stay on ABP 8.2.3 and .NET 8.
My question is: Is there a recommended mitigation or usage pattern within ABP to safely address this Scriban issue without upgrading the framework or runtime?
Thank you.
4 Answer(s)
-
0
Hi,
The CWE-693 vulnerability (GHSA-5wr9-m6jw-xx44) in Scriban is about
TemplateContextcaching type member accessors byTypeonly. It can be exploited when aTemplateContextinstance is reused across renders and theMemberFilterorMemberRenameris tightened between renders — previously cached accessors may still be exposed.However, ABP's Scriban usage does not trigger this vulnerability:
- ABP creates a new
TemplateContextinstance for every render call — it never reusesTemplateContextacross renders. - ABP does not configure
MemberFilterorMemberRenameronTemplateContextat all.
Since the vulnerability requires reusing a
TemplateContextwith dynamically tightened member access restrictions, and ABP doesn't do that, the actual risk is very low.That said, if you want to eliminate the warning entirely, you can override the Scriban version to 7.0.0 in your project file. We tested this with ABP 8.2.3 on .NET 8 and it works without any issues:
<ItemGroup> <PackageReference Include="Scriban" Version="7.0.0" /> </ItemGroup>This will resolve all Scriban-related security warnings.
Alternatively, if you prefer to keep the original version, you can suppress specific advisories:
<ItemGroup> <NuGetAuditSuppress Include="https://github.com/advisories/GHSA-5wr9-m6jw-xx44" /> </ItemGroup>Thanks
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) - ABP creates a new
-
0
[maliming] said: Hi,
The CWE-693 vulnerability (GHSA-5wr9-m6jw-xx44) in Scriban is about
TemplateContextcaching type member accessors byTypeonly. It can be exploited when aTemplateContextinstance is reused across renders and theMemberFilterorMemberRenameris tightened between renders — previously cached accessors may still be exposed.However, ABP's Scriban usage does not trigger this vulnerability:
- ABP creates a new
TemplateContextinstance for every render call — it never reusesTemplateContextacross renders.
- ABP does not configure
MemberFilterorMemberRenameronTemplateContextat all.
Since the vulnerability requires reusing a
TemplateContextwith dynamically tightened member access restrictions, and ABP doesn't do that, the actual risk is very low.That said, if you want to eliminate the warning entirely, you can override the Scriban version to 7.0.0 in your project file. We tested this with ABP 8.2.3 on .NET 8 and it works without any issues:
This will resolve all Scriban-related security warnings.
Alternatively, if you prefer to keep the original version, you can suppress specific advisories:
Thanks
Hi,
I tried adding
<ItemGroup> <PackageReference Include="Scriban" Version="7.0.0" /> </ItemGroup> but getting below execption:
2026-04-13 14:15:10.552 +08:00 [ERR] Could not load type 'Scriban.Parsing.ParserOptions' from assembly 'Volo.Abp.TextTemplating.Scriban, Version=8.2.3.0, Culture=neutral, PublicKeyToken=null' due to value type mismatch. System.TypeLoadException: Could not load type 'Scriban.Parsing.ParserOptions' from assembly 'Volo.Abp.TextTemplating.Scriban, Version=8.2.3.0, Culture=neutral, PublicKeyToken=null' due to value type mismatch. at Volo.Abp.TextTemplating.Scriban.ScribanTemplateRenderingEngine.RenderTemplateContentWithScribanAsync(TemplateDefinition templateDefinition, String templateContent, Dictionary
2 globalContext, Object model) at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) at Volo.Abp.TextTemplating.Scriban.ScribanTemplateRenderingEngine.RenderTemplateContentWithScribanAsync(TemplateDefinition templateDefinition, String templateContent, Dictionary2 globalContext, Object model) at Volo.Abp.TextTemplating.Scriban.ScribanTemplateRenderingEngine.RenderSingleTemplateAsync(TemplateDefinition templateDefinition, Dictionary2 globalContext, Object model) at Volo.Abp.TextTemplating.Scriban.ScribanTemplateRenderingEngine.RenderInternalAsync(String templateName, Dictionary2 globalContext, Object model) at Volo.Abp.TextTemplating.Scriban.ScribanTemplateRenderingEngine.RenderAsync(String templateName, Object model, String cultureName, Dictionary2 globalContext) at Volo.Abp.TextTemplating.AbpTemplateRenderer.RenderAsync(String templateName, Object model, String cultureName, Dictionary2 globalContext) at eFC.Common.ReportGenerator.SetHeaderTemplate(String FCNo, Encounter encounter, String mrn, Patient patient, String Specialty, String surgicalProcedure, String basedOn, String pGender, String residentialStatus, String specilaty, String headerText, String headerBody, String institutionCode, String campusCode, String encounterNoForheader, String fcmodecode) in C:\DIM\OctRelease\eFC\src\src\eFC.Application\Common\ReportGenerator.cs:line 814 at eFC.Common.ReportGenerator.GenerateETBSDetailedAsync(BillDetailDto bill, Int64 FCId, String priceMode, Boolean IsDetailed, Nullable1 columnId, String username, Boolean calcEstimatedMSVHPay) in C:\DIM\OctRelease\eFC\src\src\eFC.Application\Common\ReportGenerator.cs:line 203 at eFC.BT.BTAppService.DownloadPdfAsync(DownloadPdfDto input) in C:\DIM\OctRelease\eFC\src\src\eFC.Application\BT\BTAppService.cs:line 780 at lambda_method4575(Closure, Object) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) 2026-04-13 14:27:07.103 +08:00 [ERR] An error occurred using a transaction. 2026-04-13 14:27:08.505 +08:00 [ERR] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "An internal error occurred during your request!", "details": null, "data": {}, "validationErrors": null }Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) - ABP creates a new
-
0
Don’t override
Scribanto 7.x on ABP 8.2.3. The exception you see is expected becauseVolo.Abp.TextTemplating.Scriban(v8.2.3) was built against an older Scriban API. In Scriban 7, some types (e.g.,Scriban.Parsing.ParserOptions) changed in a breaking way, so ABP 8.2.3’s Scriban integration assembly can no longer load the expected type shape, resulting in:TypeLoadException ... ParserOptions ... value type mismatch.Recommended mitigation on ABP 8.2.3 / .NET 8 (no framework/runtime upgrade):
- Keep Scriban at ABP’s pinned transitive version (remove the explicit
<PackageReference Include="Scriban" Version="7.0.0" />). - Ensure you do not reuse
TemplateContextinstances across renders in your own code. The reported GHSA/CWE scenario requires reusing the sameTemplateContextand then tighteningMemberFilter/MemberRenamerlater. ABP’s integration is designed around rendering templates per call (i.e., no long-lived/reusedTemplateContextpattern in normal usage). - If your goal is to satisfy security scanning rather than a practical exploit path in your app, the viable option without breaking ABP 8.2.3 is to suppress the specific NuGet advisory for Scriban (since upgrading Scriban alone is not compatible with ABP 8.2.3):
- Keep Scriban at ABP’s pinned transitive version (remove the explicit
<ItemGroup> <NuGetAuditSuppress Include="https://github.com/advisories/GHSA-5wr9-m6jw-xx44" /> </ItemGroup>What not to do
- Do not force Scriban 7.x with ABP 8.2.3; it is not binary-compatible with
Volo.Abp.TextTemplating.Scribanv8.2.3 (as your runtime error demonstrates).
- Do not force Scriban 7.x with ABP 8.2.3; it is not binary-compatible with
If you need Scriban 7.x fix without suppression
- That requires an ABP version whose
Volo.Abp.TextTemplating.Scribanpackage is built for Scriban 7.x (i.e., an ABP upgrade path), not just a runtime/.NET upgrade toggle.
- That requires an ABP version whose
Sources (validated):
- https://abp.io/docs/latest/framework/infrastructure/text-templating/scriban
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Hi,
Thanks for sharing the error. Yes, Scriban 7.0.0 changed
ParserOptionsfromstructtorecord, so overriding the version doesn't work with ABP 8.2.x.The good news is ABP's Scriban usage does not trigger this vulnerability:
- ABP creates a new
TemplateContextinstance for every render call — it never reusesTemplateContextacross renders. - ABP does not configure
MemberFilterorMemberRenameronTemplateContextat all.
Since the vulnerability requires reusing a
TemplateContextwith dynamically tightened member access restrictions, and ABP doesn't do that, the actual risk is very low.You can suppress this specific advisory warning by adding the following to your project file:
<ItemGroup> <NuGetAuditSuppress Include="https://github.com/advisories/GHSA-5wr9-m6jw-xx44" /> </ItemGroup>Thanks
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) - ABP creates a new