Skip to content

Sync upstream: optimized v3 circuit + gnark security upgrade - #6

Open
stackchain wants to merge 26 commits into
mainfrom
sync/upstream-main-191ca93
Open

Sync upstream: optimized v3 circuit + gnark security upgrade#6
stackchain wants to merge 26 commits into
mainfrom
sync/upstream-main-191ca93

Conversation

@stackchain

Copy link
Copy Markdown
Member

Summary

  • Merges Anastasia-Labs/proof-tool main (3b37efe) into the Emurgo fork.
  • Brings in the gnark upgrade that retires the unsafe v1/v2 proof keys (GHSA-3mvx-pp85-pm65) and the optimized ownership-destination-v3 circuit.
  • Includes the new preprod release proof-assets-ownership-destination-v3-preprod-191ca93-opt-reclaim-07d48bc5-r1 (new reclaim deployment 07d48bc5…, PK down to ~1.07 GB) that claim-fe will pin.

Test plan

  • CI green on the sync branch
  • claim-fe bun run prepare-proof-tool + build against the new release pin

colll78 and others added 26 commits August 3, 2026 21:22
…-mainnet-builtins-optimized-scripts

Optimize Plutus V3 contracts for mainnet builtins
…t-one-shot-params-policy

fix(contracts): compact one-shot params policy
…ovider-eval-for-preprod-deploy

fix(web): use Scalus for PV11 local evaluation
…sia-Labs#48)

Reviewed preparation merge for the guarded ownership-destination-v3 Preprod rollout.
…zed-circuit-preprod-cutover-tested

Release optimized destination circuit to Preprod

async function initRuntime(msg) {
const msmCompile = compileMSMWorkerModule(msg.msmWorkerWasmUrl).catch(() => null);
importScripts(msg.wasmExecUrl);

async function initRuntime(msg) {
const msmCompile = compileMSMWorkerModule(msg.msmWorkerWasmUrl).catch(() => null);
importScripts(msg.wasmExecUrl);

func digestConstraintSystem(ccs constraint.ConstraintSystem) (ceremonyDigest, error) {
func writeAndDigestConstraintSystem(ccs constraint.ConstraintSystem, outputPath string) (ceremonyDigest, error) {
f, err := os.OpenFile(outputPath, os.O_WRONLY|os.O_CREATE|os.O_EXCL, 0o600)

@aikido-pr-checks aikido-pr-checks Bot Aug 31, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential file inclusion attack via reading file - high severity
If an attacker can control the input leading into the ReadFile function, they might be able to read sensitive files and launch further attacks with that information.

Show fix
Suggested change
f, err := os.OpenFile(outputPath, os.O_WRONLY|os.O_CREATE|os.O_EXCL, 0o600)
for _, seg := range strings.Split(filepath.ToSlash(outputPath), "/") {
if seg == ".." {
return ceremonyDigest{}, fmt.Errorf("invalid file path")
}
}
f, err := os.OpenFile(outputPath, os.O_WRONLY|os.O_CREATE|os.O_EXCL, 0o600)

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

async function compileMSMWorkerModule(url) {
if (!url) return null;
if (typeof WebAssembly.compileStreaming === 'function') {
return await WebAssembly.compileStreaming(fetch(url));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HTTP request might enable SSRF attack - low severity
If an attacker can control the URL input leading into this http request, the attack might be able to perform an SSRF attack. This kind of attack is even more dangerous is the application returns the result of the URL fetch to the user. It can serve as an initial access point for an attacker for stealing credentials in the cloud.

Show fix

Remediation: If possible, only allow requests to verified domains. If not, consult the article linked above to learn about other mitigating techniques such as disabling redirects, blocking private IPs and making sure private services have internal authentication. If you return data coming from the request to the user, validate the data before returning it to make sure you don't return random data.

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

if (typeof WebAssembly.compileStreaming === 'function') {
return await WebAssembly.compileStreaming(fetch(url));
}
return await WebAssembly.compile(await (await fetch(url)).arrayBuffer());

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HTTP request might enable SSRF attack - low severity
If an attacker can control the URL input leading into this http request, the attack might be able to perform an SSRF attack. This kind of attack is even more dangerous is the application returns the result of the URL fetch to the user. It can serve as an initial access point for an attacker for stealing credentials in the cloud.

Show fix

Remediation: If possible, only allow requests to verified domains. If not, consult the article linked above to learn about other mitigating techniques such as disabling redirects, blocking private IPs and making sure private services have internal authentication. If you return data coming from the request to the user, validate the data before returning it to make sure you don't return random data.

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

go.env.GOMEMLIMIT = msg.gomemlimit ? String(msg.gomemlimit) : '3000MiB';
let instance;
if (typeof WebAssembly.instantiateStreaming === 'function') {
const result = await WebAssembly.instantiateStreaming(fetch(msg.wasmUrl), go.importObject);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HTTP request might enable SSRF attack - low severity
If an attacker can control the URL input leading into this http request, the attack might be able to perform an SSRF attack. This kind of attack is even more dangerous is the application returns the result of the URL fetch to the user. It can serve as an initial access point for an attacker for stealing credentials in the cloud.

Show fix

Remediation: If possible, only allow requests to verified domains. If not, consult the article linked above to learn about other mitigating techniques such as disabling redirects, blocking private IPs and making sure private services have internal authentication. If you return data coming from the request to the user, validate the data before returning it to make sure you don't return random data.

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

const result = await WebAssembly.instantiateStreaming(fetch(msg.wasmUrl), go.importObject);
instance = result.instance;
} else {
const bytes = await (await fetch(msg.wasmUrl)).arrayBuffer();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HTTP request might enable SSRF attack - low severity
If an attacker can control the URL input leading into this http request, the attack might be able to perform an SSRF attack. This kind of attack is even more dangerous is the application returns the result of the URL fetch to the user. It can serve as an initial access point for an attacker for stealing credentials in the cloud.

Show fix

Remediation: If possible, only allow requests to verified domains. If not, consult the article linked above to learn about other mitigating techniques such as disabling redirects, blocking private IPs and making sure private services have internal authentication. If you return data coming from the request to the user, validate the data before returning it to make sure you don't return random data.

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

async function compileMSMWorkerModule(url) {
if (!url) return null;
if (typeof WebAssembly.compileStreaming === 'function') {
return await WebAssembly.compileStreaming(fetch(url));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HTTP request might enable SSRF attack - low severity
If an attacker can control the URL input leading into this http request, the attack might be able to perform an SSRF attack. This kind of attack is even more dangerous is the application returns the result of the URL fetch to the user. It can serve as an initial access point for an attacker for stealing credentials in the cloud.

Show fix

Remediation: If possible, only allow requests to verified domains. If not, consult the article linked above to learn about other mitigating techniques such as disabling redirects, blocking private IPs and making sure private services have internal authentication. If you return data coming from the request to the user, validate the data before returning it to make sure you don't return random data.

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

if (typeof WebAssembly.compileStreaming === 'function') {
return await WebAssembly.compileStreaming(fetch(url));
}
return await WebAssembly.compile(await (await fetch(url)).arrayBuffer());

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HTTP request might enable SSRF attack - low severity
If an attacker can control the URL input leading into this http request, the attack might be able to perform an SSRF attack. This kind of attack is even more dangerous is the application returns the result of the URL fetch to the user. It can serve as an initial access point for an attacker for stealing credentials in the cloud.

Show fix

Remediation: If possible, only allow requests to verified domains. If not, consult the article linked above to learn about other mitigating techniques such as disabling redirects, blocking private IPs and making sure private services have internal authentication. If you return data coming from the request to the user, validate the data before returning it to make sure you don't return random data.

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

go.env.GOMEMLIMIT = msg.gomemlimit ? String(msg.gomemlimit) : '3000MiB';
let instance;
if (typeof WebAssembly.instantiateStreaming === 'function') {
const result = await WebAssembly.instantiateStreaming(fetch(msg.wasmUrl), go.importObject);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HTTP request might enable SSRF attack - low severity
If an attacker can control the URL input leading into this http request, the attack might be able to perform an SSRF attack. This kind of attack is even more dangerous is the application returns the result of the URL fetch to the user. It can serve as an initial access point for an attacker for stealing credentials in the cloud.

Show fix

Remediation: If possible, only allow requests to verified domains. If not, consult the article linked above to learn about other mitigating techniques such as disabling redirects, blocking private IPs and making sure private services have internal authentication. If you return data coming from the request to the user, validate the data before returning it to make sure you don't return random data.

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

const result = await WebAssembly.instantiateStreaming(fetch(msg.wasmUrl), go.importObject);
instance = result.instance;
} else {
const bytes = await (await fetch(msg.wasmUrl)).arrayBuffer();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HTTP request might enable SSRF attack - low severity
If an attacker can control the URL input leading into this http request, the attack might be able to perform an SSRF attack. This kind of attack is even more dangerous is the application returns the result of the URL fetch to the user. It can serve as an initial access point for an attacker for stealing credentials in the cloud.

Show fix

Remediation: If possible, only allow requests to verified domains. If not, consult the article linked above to learn about other mitigating techniques such as disabling redirects, blocking private IPs and making sure private services have internal authentication. If you return data coming from the request to the user, validate the data before returning it to make sure you don't return random data.

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

"required_global_credential": "a4da74e7cb6ea4f4e60456a0a6eabf0ccf83464ebe55664390ef39f8"
"address": "addr_test1wqrafz79yssrysfer2pan35dxvdqlsw5ce202wn7nrt3f5qgsahq2",
"script_hash": "07d48bc524203241391a83d9c68d331a0fc1d4c654f53a7e98d714d0",
"required_global_credential": "11a14098f4b579a34ee8309e3c2733fd449e61ca1287b3d20f68e2de"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exposed secret in apps/ownership-proof-web/public/proof-assets/reclaim-deployment.json - high severity
Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More Info

"reclaim_base": {
"address": "addr_test1wqcdkvd4awd955tyug4gllatykxclrcmxyrfye4s5s8hj8cjy7xda",
"script_hash": "30db31b5eb9a5a5164e22a8fffab258d8f8f1b31069266b0a40f791f",
"required_global_credential": "0ba0ad6b8ead49c5df537b90f7089448ee1dc95c949f35ca0a550bf1"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exposed secret in apps/ownership-proof-web/public/proof-releases/proof-assets-ownership-destination-v2-preprod-9fac96b-g3a-2m-reclaim-30db31b5-r1/assets/reclaim-deployment.json - low severity
Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More Info

"reclaim_base": {
"address": "addr_test1wqrafz79yssrysfer2pan35dxvdqlsw5ce202wn7nrt3f5qgsahq2",
"script_hash": "07d48bc524203241391a83d9c68d331a0fc1d4c654f53a7e98d714d0",
"required_global_credential": "11a14098f4b579a34ee8309e3c2733fd449e61ca1287b3d20f68e2de"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exposed secret in apps/ownership-proof-web/public/proof-releases/proof-assets-ownership-destination-v3-preprod-191ca93-opt-reclaim-07d48bc5-r1/assets/reclaim-deployment.json - low severity
Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More Info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants